package com.delivery.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName delivery_order
 */
@TableName(value ="delivery_order")
@Data
public class Order implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 商户订单号
     */
    private String code;

    /**
     * 微信支付系统生成流水号
     */
    private String transactionId;

    /**
     * 商户退款单号
     */
    private String outRefundNo;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 下单时间
     */
    private Date orderTime;

    /**
     * 收件人
     */
    private String recManName;

    /**
     * 收件人手机号
     */
    private String recManMobile;

    /**
     * 收件人地址
     */
    private String recManPrintAddr;

    /**
     * 寄件人
     */
    private String sendManName;

    /**
     * 寄件人手机号
     */
    private String sendManMobile;

    /**
     * 寄件人地址
     */
    private String sendManPrintAddr;

    /**
     * 保价金额
     */
    private String valinsPay;

    /**
     * 物品信息
     */
    private String cargo;

    /**
     * 物品重量
     */
    private String weight;

    /**
     * 订单备注
     */
    private String remark;

    /**
     * 订单支付状态[0-已取消；2-已支付 3-已退款 ]
     */
    private Integer payStatus;

    /**
     * 快递100预扣金额
     */
    private BigDecimal orderAmountWithhold;

    /**
     * 订单金额
     */
    private BigDecimal orderAmount;

    /**
     * 快递公司编码 
     */
    private String kuaidiCoding;

    /**
     * 快递100订单id
     */
    private String kuaidi100Id;

    /**
     * 	任务ID
     */
    private String taskid;

    /**
     * 快递单号
     */
    private String kuaidinum;

    /**
     * 订单状态： 0：'下单成功'； 1：'已接单'； 2：'收件中'； 9：'用户主动取消'； 10；'已取件'； 11；'揽货失败'； 12；'已退回'； 13；'已签收'； 14；'异常签收'；15；'已结算' 99；'订单已取消'101；'运输中'；200：'已出单'201：'出单失败'
     */
    private Integer orderStatus;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Order other = (Order) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
            && (this.getTransactionId() == null ? other.getTransactionId() == null : this.getTransactionId().equals(other.getTransactionId()))
            && (this.getOutRefundNo() == null ? other.getOutRefundNo() == null : this.getOutRefundNo().equals(other.getOutRefundNo()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getOrderTime() == null ? other.getOrderTime() == null : this.getOrderTime().equals(other.getOrderTime()))
            && (this.getRecManName() == null ? other.getRecManName() == null : this.getRecManName().equals(other.getRecManName()))
            && (this.getRecManMobile() == null ? other.getRecManMobile() == null : this.getRecManMobile().equals(other.getRecManMobile()))
            && (this.getRecManPrintAddr() == null ? other.getRecManPrintAddr() == null : this.getRecManPrintAddr().equals(other.getRecManPrintAddr()))
            && (this.getSendManName() == null ? other.getSendManName() == null : this.getSendManName().equals(other.getSendManName()))
            && (this.getSendManMobile() == null ? other.getSendManMobile() == null : this.getSendManMobile().equals(other.getSendManMobile()))
            && (this.getSendManPrintAddr() == null ? other.getSendManPrintAddr() == null : this.getSendManPrintAddr().equals(other.getSendManPrintAddr()))
            && (this.getValinsPay() == null ? other.getValinsPay() == null : this.getValinsPay().equals(other.getValinsPay()))
            && (this.getCargo() == null ? other.getCargo() == null : this.getCargo().equals(other.getCargo()))
            && (this.getWeight() == null ? other.getWeight() == null : this.getWeight().equals(other.getWeight()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getPayStatus() == null ? other.getPayStatus() == null : this.getPayStatus().equals(other.getPayStatus()))
            && (this.getOrderAmountWithhold() == null ? other.getOrderAmountWithhold() == null : this.getOrderAmountWithhold().equals(other.getOrderAmountWithhold()))
            && (this.getOrderAmount() == null ? other.getOrderAmount() == null : this.getOrderAmount().equals(other.getOrderAmount()))
            && (this.getKuaidiCoding() == null ? other.getKuaidiCoding() == null : this.getKuaidiCoding().equals(other.getKuaidiCoding()))
            && (this.getKuaidi100Id() == null ? other.getKuaidi100Id() == null : this.getKuaidi100Id().equals(other.getKuaidi100Id()))
            && (this.getTaskid() == null ? other.getTaskid() == null : this.getTaskid().equals(other.getTaskid()))
            && (this.getKuaidinum() == null ? other.getKuaidinum() == null : this.getKuaidinum().equals(other.getKuaidinum()))
            && (this.getOrderStatus() == null ? other.getOrderStatus() == null : this.getOrderStatus().equals(other.getOrderStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
        result = prime * result + ((getTransactionId() == null) ? 0 : getTransactionId().hashCode());
        result = prime * result + ((getOutRefundNo() == null) ? 0 : getOutRefundNo().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getOrderTime() == null) ? 0 : getOrderTime().hashCode());
        result = prime * result + ((getRecManName() == null) ? 0 : getRecManName().hashCode());
        result = prime * result + ((getRecManMobile() == null) ? 0 : getRecManMobile().hashCode());
        result = prime * result + ((getRecManPrintAddr() == null) ? 0 : getRecManPrintAddr().hashCode());
        result = prime * result + ((getSendManName() == null) ? 0 : getSendManName().hashCode());
        result = prime * result + ((getSendManMobile() == null) ? 0 : getSendManMobile().hashCode());
        result = prime * result + ((getSendManPrintAddr() == null) ? 0 : getSendManPrintAddr().hashCode());
        result = prime * result + ((getValinsPay() == null) ? 0 : getValinsPay().hashCode());
        result = prime * result + ((getCargo() == null) ? 0 : getCargo().hashCode());
        result = prime * result + ((getWeight() == null) ? 0 : getWeight().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getPayStatus() == null) ? 0 : getPayStatus().hashCode());
        result = prime * result + ((getOrderAmountWithhold() == null) ? 0 : getOrderAmountWithhold().hashCode());
        result = prime * result + ((getOrderAmount() == null) ? 0 : getOrderAmount().hashCode());
        result = prime * result + ((getKuaidiCoding() == null) ? 0 : getKuaidiCoding().hashCode());
        result = prime * result + ((getKuaidi100Id() == null) ? 0 : getKuaidi100Id().hashCode());
        result = prime * result + ((getTaskid() == null) ? 0 : getTaskid().hashCode());
        result = prime * result + ((getKuaidinum() == null) ? 0 : getKuaidinum().hashCode());
        result = prime * result + ((getOrderStatus() == null) ? 0 : getOrderStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", code=").append(code);
        sb.append(", transactionId=").append(transactionId);
        sb.append(", outRefundNo=").append(outRefundNo);
        sb.append(", userId=").append(userId);
        sb.append(", orderTime=").append(orderTime);
        sb.append(", recManName=").append(recManName);
        sb.append(", recManMobile=").append(recManMobile);
        sb.append(", recManPrintAddr=").append(recManPrintAddr);
        sb.append(", sendManName=").append(sendManName);
        sb.append(", sendManMobile=").append(sendManMobile);
        sb.append(", sendManPrintAddr=").append(sendManPrintAddr);
        sb.append(", valinsPay=").append(valinsPay);
        sb.append(", cargo=").append(cargo);
        sb.append(", weight=").append(weight);
        sb.append(", remark=").append(remark);
        sb.append(", payStatus=").append(payStatus);
        sb.append(", orderAmountWithhold=").append(orderAmountWithhold);
        sb.append(", orderAmount=").append(orderAmount);
        sb.append(", kuaidiCoding=").append(kuaidiCoding);
        sb.append(", kuaidi100Id=").append(kuaidi100Id);
        sb.append(", taskid=").append(taskid);
        sb.append(", kuaidinum=").append(kuaidinum);
        sb.append(", orderStatus=").append(orderStatus);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}